<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Oauth2 Login</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.2/font/bootstrap-icons.css">
</head>
<body>
<nav class="navbar navbar-light bg-light">
    <div class="container-fluid">
        <div class="navbar-brand d-inline-flex">
            <img src="https://cdn.smart7.tech/static/img/Perfect7.png" alt=""
                 style="width: 2.5rem;height: 2.5rem;"
                 class="d-inline-block align-text-top">
            <span class="my-auto mx-3">Axum_test apps</span>
        </div>
        <button type="button" class="btn btn-light"
                onclick="window.open('/api/oauth2/logout','_self')"><i
                class="bi bi-box-arrow-right"></i><span class="my-auto mx-1">注销</span>
        </button>
    </div>
</nav>
<div class="container" style="height: 100vh;">
    <div class="row justify-content-center mt-5" style="height: 80%;">
        <div class="row row-cols-1 row-cols-sm-2 row-cols-md-4 row-cols-lg-6">
            {% for app in apps%}
            <div class="col-3"
                 onclick="window.open('/api/oauth2/app_content?application_url={{ app.redirect_uri }}','_self')">
                <div class="card border-0">
                    <img src="{{ app.client_icon }}" class="img-thumbnail rounded mx-auto d-block"
                         style="width: 10rem;height: 10rem;"
                         alt="{{ app.client_name }}">
                    <div class="card-body">
                        <div class="row">
                            <h5 class="card-title text-center fs-3">{{ app.client_name }}</h5>
                        </div>
                    </div>
                </div>
            </div>
            {%endfor%}
        </div>
    </div>
</div>
</body>
</html>